﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;

namespace DELVE_GAME.ViewStructure
{
    class Actor : ViewComponent
    {
        protected Sprite sprite;
        protected int imageIndex;
        protected Color color = Color.White;

        public virtual void setSprite(Sprite sprite)
        {
            this.sprite = sprite;
            imageIndex = 0;
        }

        public override void update()
        {

        }

        public virtual void setColor(Color color)
        {
            this.color = color;
        }

        public override void draw(SpriteBatch sb)
        {
            if (visible)
            {
                if (sprite != null)
                {
                    sprite.draw(sb, this.x + this.offsetX, this.y + this.offsetY, this.imageIndex, 1.0, color);
                }
            }
        }

        public void draw(SpriteBatch sb, Color color)
        {
            if (visible)
            {
                if (sprite != null)
                {
                    sprite.draw(sb, this.x + this.offsetX, this.y + this.offsetY, this.imageIndex, 1.0, color);
                }
            }
        }

        public override bool checkCollision(int x, int y)
        {
            return false;
            //throw (new NotImplementedException());
        }

        public override void mouseOver(int x, int y)
        {
            //throw (new NotImplementedException());
        }

        public override void mousePressed(int x, int y)
        {
            //throw (new NotImplementedException());
        }

        public override void mouseReleased(int x, int y)
        {
            //throw (new NotImplementedException());
        }

        public override void keyPressed(Keys key)
        {
            //throw (new NotImplementedException());
        }

        public override void keyReleased(Keys key)
        {
            //throw (new NotImplementedException());
        }
    }
}
